import request from '@/utils/request'

export function getScoreInfo(
  page: number,
  pageSize: number,
  studentId: string,
  stuName: string,
  className: string
) {
  return request({
    url:
      'admin/getScoreInfo?page=' +
      page +
      '&pageSize=' +
      pageSize +
      '&studentId=' +
      studentId +
      '&stuName=' +
      stuName +
      '&className=' +
      className,
    method: 'get'
  })
}

export function updateScore(data: object) {
  return request({
    url: '/admin/updateScore',
    method: 'put',
    data: data
  })
}

export function ExportScoreInfo(className: string) {
  return request({
    url: '/admin/export/scoreTable?className=' + className,
    method: 'get',
    responseType: 'blob'
  })
}
